<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        
        document.onclick = function(ev){
            // let {clientX:x,clientY:y} = ev;
            // console.log(x,y);

            let {clientX,clientY} = ev;
            console.log(clientX,clientY);
        }


        //参数优化
        function fn({a,b,c}){
            console.log(a,b,c);
        }
        fn({c:300,b:200,a:100});  //a->100  b->200  c->300
    </script>
</body>
</html>